<html>
<head><meta charset="utf-8"><title>tracing paused tasks · turbowish · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/index.html">turbowish</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html">tracing paused tasks</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236304137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304137">(Apr 27 2021 at 09:01)</a>:</h4>
<p>I just want to float something that I've said to <span class="user-mention" data-user-id="116083">@pnkfelix</span> from time to time. There is something really quite special about async-await -- a task that is "awaiting" something lives entirely in the heap, and the format of the stack frame is entirely under our control. This means we could expose primitives that reflect on the stack trace for a paused task and allow us to enumerate all the data that it owns.</p>



<a name="236304160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304160">(Apr 27 2021 at 09:01)</a>:</h4>
<p>This seems pretty relevant to what <span class="user-mention" data-user-id="116883">@tmandry</span> as saying in <a class="stream-topic" data-stream-id="284843" href="/#narrow/stream/284843-turbowish/topic/performance.20tooling.20ideas">#turbowish &gt; performance tooling ideas</a></p>



<a name="236304182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304182">(Apr 27 2021 at 09:02)</a>:</h4>
<p>Given enough work, we can do the same for synchronized tasks, but it's much harder since it requires LLVM GC support and the like</p>



<a name="236304245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304245">(Apr 27 2021 at 09:02)</a>:</h4>
<p>I think it'd be pretty cool to use this to figure things out like "what task holds the sender for this channel"</p>



<a name="236304287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304287">(Apr 27 2021 at 09:02)</a>:</h4>
<p>However, there are some complications :) you'd have to trace the tasks, and there are questions like "do you stop the world", that sort of thing</p>



<a name="236304407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304407">(Apr 27 2021 at 09:03)</a>:</h4>
<p>OK, I finished reading the thread and I guess everyone else realized it too lol :)</p>



<a name="236304496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304496">(Apr 27 2021 at 09:04)</a>:</h4>
<p>That said, I think we should really think about the idea of exposing "tracing through data" as a kind of primitive that can be used for many things (turbowish among them)</p>



<a name="236304523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/284843-turbowish/topic/tracing%20paused%20tasks/near/236304523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/284843-turbowish/topic/tracing.20paused.20tasks.html#236304523">(Apr 27 2021 at 09:04)</a>:</h4>
<p>I'm not sure how to think about the capability implications though</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>